import request from '@/utils/request'

// 查询参会人员配置列表
export function listMtPersonConfig(query) {
  return request({
    url: '/config/mtPersonConfig/list',
    method: 'get',
    params: query
  })
}

// 查询参会人员配置详细
export function getMtPersonConfig(id) {
  return request({
    url: '/config/mtPersonConfig/' + id,
    method: 'get'
  })
}

// 根据会议类型获取processKey
export function getProcessKeyByMeetingType(meetingType) {
  return request({
    url: '/config/mtPersonConfig/getProcessKeyByMeetingType/' + meetingType,
    method: 'get'
  })
}

export function checkMeetingType(meetingType) {
  return request({
    url: '/config/mtPersonConfig/check/' + meetingType,
    method: 'get'
  })
}

// 保存参会人员配置
export function saveMtPersonConfig(data) {
  return request({
    url: '/config/mtPersonConfig/save',
    method: 'post',
    data: data
  })
}

// 删除参会人员配置
export function delMtPersonConfig(id) {
  return request({
    url: '/config/mtPersonConfig/' + id,
    method: 'delete'
  })
}

// 导出参会人员配置
export function exportMtPersonConfig(query) {
  return request({
    url: '/config/mtPersonConfig/export',
    method: 'get',
    params: query
  })
}

export function getConfigByMeetingId(meetingId) {
  return request({
    url: '/config/mtPersonConfig/getConfig/' + meetingId,
    method: 'get'
  })
}
